/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package session.stateless;

import entity.Credit;
import entity.Invoice;
import entity.Payment;
import entity.Receipt;
import java.util.List;
import javax.ejb.Local;

/**
 *
 * @author Wx
 */
@Local
public interface CreditSessionBeanLocal {
    public void updateInvoice(Long id, String status);
    public Receipt getReceipt(Long paymentId);
    public Invoice getInvoice(Long purchaseItemId, String type, String status);
    public Invoice getInvoice(Long purchaseItemId, String status);
    public List<Invoice> getInvoices(Long purchaseItemId);
//    public void updateInvoice(Long id, Payment payment);
    public void addInvoice(Invoice invoice);
    public void addCredit(Long customerId, Credit credit);
//    public void updateCredit(Long creditId, Payment payment);
//    public void updateCredit(Long creditId, Receipt receipt);
    public void updateCredit(Long creditId, Invoice invoice);
    public void updateCredit(Long creditId, Credit credit);
    public void updatePurchaseItem(Long purchaseItemId, Double outstandingAmount, String status);
    public void updatePayment(Long id, String status);
    public void addPayment(Long invoiceId, Double amountPaid, Double balanceUsed, String status);
//    public void addReceipt(Long creditId, Long paymentId, Double amountPaid, String status);
    public void addReceipt(Long paymentId, Double amountPaid, String status);
    public Payment getPayment(Long invoiceId);
}
